<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org">
<body>
    <div style="padding:10px">
        <form id="editForm" method="post" class="easyui-form">
            <table cellpadding="5" align="center">
                <tr>
                    <td>父节点:</td>
                    <td>

                        <input class="easyui-validatebox" type="text" style="width: 200px" th:value="${parentNode.name}" disabled="disabled"/>
                    </td>
                </tr>
                <tr>
                    <td>名称:</td>
                    <td>
                        <input type="hidden" name="id" th:value="${node.id}"/>
                        <input class="easyui-validatebox" type="text" style="width: 200px" name="name" th:value="${node.name}" data-options="required:true,validType:'maxLength[30]'"/>
                    </td>
                </tr>
                <tr>
                    <td>类型:</td>
                    <td>
                        <select class="easyui-combobox" id="combobox_resType" name="resType" th:value="${node.resType}" style="width:80px" data-options="editable:false,panelHeight:'auto',onChange:function(n,o){resTypeChange(n,o,'editForm');}">
                            <option value="AUTH" th:selected="${node.resType=='AUTH'}">权限</option>
                            <option value="API" th:selected="${node.resType=='API'}">API</option>
                            <option value="MENU" th:selected="${node.resType=='MENU'}">子菜单</option>
                            <option value="FOLDER" th:selected="${node.resType=='FOLDER'}">菜单夹</option>
                        </select>
                    </td>
                </tr>
                <tr>
                    <td>URL:</td>
                    <td><input class="easyui-validatebox" type="text" style="width: 200px" name="url" th:value="${node.url}" data-options="required:true,validType:'maxLength[60]'"/></td>
                </tr>
                <tr>
                    <td>权限标识:</td>
                    <td><input class="easyui-validatebox" type="text" style="width: 200px" name="permission" th:value="${node.permission}" data-options="required:true,validType:'maxLength[40]'"/></td>
                </tr>
                <tr style="display: none" id="selectIconRow">
                    <td>图标:</td>
                    <td>
                        <div style="float: left;padding-top: 3px">
                            <img th:src="${#strings.isEmpty(node.icon)?'':'/easyui/themes/myicons/'+node.icon}" id="img_icon" th:style="${#strings.isEmpty(node.icon)?'display:none':''}" />
                        </div>
                        <div style="float: right">
                            <input class="easyui-searchbox" style="width:150px" name="icon" id="searchbox_icon" th:value="${node.icon}"
                                   data-options="editable:false,required:false,searcher:selectIcon,prompt:'请选择一个图标'"/>
                        </div>
                    </td>
                </tr>
                <tr>
                    <td>排序:</td>
                    <td>
                        <input class="easyui-numberspinner" style="width:80px;" name="seq" th:value="${node.seq}"
                               required="required" data-options="min:1,max:100,editable:true"/>
                    </td>
                </tr>
                <tr>
                    <td>请求方式:</td>
                    <td>
                        <select class="easyui-combobox" name="method" th:value="${node.method}" style="width:80px" data-options="editable:false,panelHeight:'auto'">
                            <option value="NONE" th:selected="${node.method=='NONE'}" >-----</option>
                            <option value="GET" th:selected="${node.method=='GET'}">GET</option>
                            <option value="POST" th:selected="${node.method=='POST'}">POST</option>
                        </select>
                    </td>
                </tr>

                <tr>
                    <td>状态:</td>
                    <td>
                        <select class="easyui-combobox" name="state" th:value="${node.state}" style="width:80px" data-options="editable:false,panelHeight:'auto'">
                            <option value="1" th:selected="${node.state==1}">启用</option>
                            <option value="0" th:selected="${node.state==0}">禁用</option>
                        </select>
                    </td>
                </tr>
            </table>
        </form>
    </div>

</body>
</html>